// const PROXY_URL = "http://118.144.87.37:13083"; // 云服务
// const PROXY_URL = "http://192.168.1.153:8099";
const PROXY_URL = "http://192.168.1.247:8082";
module.exports = {
  productionSourceMap: false,
  runtimeCompiler: true,
  devServer: {
    port: 8088, // 端口号
    // host: "localhost",
    host: "localhost",
    https: false, // https:{type:Boolean}
    open: true, //配置自动启动浏览器
    // proxy: 'http://localhost:4000' // 配置跨域处理,只有一个代理
    proxy: {
      "/local": {
        target: "http://127.0.0.1:8082/local", // 本地
        changeOrigin: true, // 是否跨域
        pathRewrite: {
          "^/local": "/" // 替换target中的请求地址
        }
      },
      "/dp": {
        target: PROXY_URL,
        changeOrigin: true,
        pathRewrite: {
          "^/": "/"
        }
      },
      "/runtime": {
        target: PROXY_URL,
        changeOrigin: true,
        pathRewrite: {
          "^/": "/"
        }
      }
    }
  }
};
